package com.example.usermanagement.liuka.model;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.usermanagement.base.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;


/**
 * 流量使用日志
 */
@TableName("flow_log")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FlowLog extends BaseModel {


    /**
     * 当次使用流量(KB)
     */
    private BigDecimal flowSize;

    /**
     * 购买用户id
     */
    private Long flowUserId;

    /**
     * 套餐包id
     */
    private Long packageId;


    /**
     * 剩余流量
     */
    private BigDecimal surplusFlowSize;

    /**
     * 套餐总流量
     */
    private BigDecimal sumFlowSize;

    /**
     * 购买日志记录id
     */
    private Long flowPackageUserId;

    /**
     * 逻辑删除 0 未删除  1 已删除
     */
    @TableLogic(delval = "0")
    private int delFlag;
}
